/**
 * @author Administrator
 */
function loadXMLDoc(url,flag,type) {
	if(flag){
		document.getElementById("user_control_center").style.display= "none";
		document.getElementById("upload_body_right").style.display= "block";
	}else{
		var xmlhttp;
		if(window.XMLHttpRequest) {
			// 如果是 IE7+, Firefox, Chrome, Opera, Safari这些浏览器将会以下面这张方式创建
			xmlhttp = new XMLHttpRequest();
		} else {
			// 如果是 IE6, IE5将会以下面的两种方式创建
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange = function() {
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				var xml=xmlhttp.responseXML;
				//1.上架、2.待审核，3.问题书籍，4、售出书籍
				if(type==1){
					document.getElementById("sellBookShow").innerHTML = xmlhttp.responseText;
				}else if(type==2){
					document.getElementById("auditingBookShow").innerHTML = xmlhttp.responseText;
				}else if(type==3){
					document.getElementById("problemBookShow").innerHTML = xmlhttp.responseText;
				}else{
					document.getElementById("soldBookShow").innerHTML = xmlhttp.responseText;
				}
			}
		}
		xmlhttp.open("GET", url, true);
		xmlhttp.send();
	}
}

function changeType(input){
	if(input.value=='1'){i
		document.getElementById("price").setAttribute("readonly","readonly");
		//document.getElementById("book_price").style.display= "block";
	}else{
		document.getElementById("price").removeAttribute("readonly") ;
		//document.getElementById("book_price").style.display= "none";
	}
}

function fckEditot(url){
	var xmlhttp;
	if(window.XMLHttpRequest) {
		// 如果是 IE7+, Firefox, Chrome, Opera, Safari这些浏览器将会以下面这张方式创建
		xmlhttp = new XMLHttpRequest();
	} else {
		// 如果是 IE6, IE5将会以下面的两种方式创建
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange = function() {
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			var xml=xmlhttp.responseXML;
			document.getElementById("user_control_center").innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET", url, true);
	xmlhttp.send();
}
